package com.atguigu.mall.cart.service;

import com.atguigu.mall.cart.vo.Cart;
import com.atguigu.mall.cart.vo.CartItem;

import java.util.List;
import java.util.concurrent.ExecutionException;

/**
 * @author zststart
 * @create 2022-06-13 20:37
 */
public interface CartService {
    CartItem addToCart(Long skuId, Integer num) throws ExecutionException, InterruptedException;//将商品添加到购物项


    CartItem getCartItem(Long skuId);//获取购物车的某个购物项

    Cart getCart() throws ExecutionException, InterruptedException;//获取整个购物车

    void clearCart(String cartKey);//清空购物车数据

    void checkItem(Long skuId, Integer check);//勾选购物项

    void countItem(Long skuId, Integer num);//修改购物项数量

    void deleteItem(Long skuId);

    List<CartItem> getUserCartItems();
}
